package com.android.task4;

import android.graphics.Bitmap;

public class BitmapObject {
	
	int x;
	int y;
	Bitmap bm;
	int zoom;
	int numberOfTimesAccessed = 0;
	long lastAccesed;
	
	BitmapObject(int x, int y, int z, Bitmap b){
		this.x =x;
		this.y =y;
		this.bm =b;
		this.zoom = z;

		access();
	}
	
	Bitmap getBitmap(){
		return bm; 
	}
	
	int getX(){
		return x;
	}
	int getY(){
		return y;
	}
	int getZoom(){
		return zoom;
	}
	
	String getIdentifier(){
		
		return ""+x+","+y+","+zoom;
	}

	void access(){
		numberOfTimesAccessed++;
		lastAccesed = System.currentTimeMillis();
	}
	
	public int getNumberOfTimesAccessed(){
		return this.numberOfTimesAccessed;
	}
	
	public long getLastAccessed(){
		return lastAccesed;
	}
}
